package com.common.domainService;

import java.util.List;

import com.applicationLayer.formbean.ListPathForm;
import com.applicationLayer.formbean.PathForm;
import com.applicationLayer.formbean.SearchingPathForm;

public interface IPathService {

	/**
	 * Method used to list all path
	 * @return
	 */
	public List<ListPathForm> PathList();
	
	public List<ListPathForm> researchPath(SearchingPathForm searchingPathForm);
	
	/**
	 * Method used to get the last path
	 * @return
	 */
	public List<ListPathForm> getLastPath();
	
	/**
	 * Method used to get default path for a connected covoitureur
	 * @param id_ville
	 * @return
	 */
	public List<ListPathForm> getDefaultPath(int id_ville);
	
	/**
	 * Method used to get a path by its id
	 * @param id_path
	 * @return
	 */
	public PathForm getPathById(int id_path);
	
	int createPath(PathForm pathForm);

	/**
	 * Method used to add a covoitureur to a path
	 * @param id_covoitureur
	 * @param id_path
	 */
	public void addCovoitureur(int id_covoitureur, PathForm pathForm);

	/**
	 * Method used to list path for covoitureur by its id
	 * @param id_covoitureur
	 * @param old
	 * @return
	 */
	public List<ListPathForm> getPathForCovoitureurById(int id_covoitureur,boolean old);

	/**
	 * Method used to know if a covoitureur is registered for a path
	 * @param id_covoitureur
	 * @param id_path
	 * @return
	 */
	public boolean isCovoitureurRegisterForPath(int id_covoitureur, int id_path);

	/**
	 * Method used to get path posted by a covoitureur
	 * @param id_covoitureur
	 * @return
	 */
	public List<ListPathForm> getPathPostedByCovoitureurId(int id_covoitureur);

	/**
	 * Method used to remove a covoitureur for a path
	 * @param id_covoitureur
	 * @param pa
	 */
	public void removeCovoitureur(int id_covoitureur, PathForm pa);

	public void editPath(PathForm path);

	public void removePath(String listIdToDelete);
}
